<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  var colors = ["Red", "Green", "White", "Black"];
  document.write(colors.join(" ")+'<br/>');// case 1 output: 'Red Green White Black'
  document.write(colors.join("+")+'<br/>');// case 2 output: 'Red+Green+White+Black'
  document.write(colors.join(",")+'<br/>'); // case 3 output: 'Red,Green,White,Black'
</script>
</body>
</html>